The Unsupervised Learning Workshop by AARON JONES CHRISTOPHER KRUGER BENJAMIN JOHNSTON
Author:AARON JONES, CHRISTOPHER KRUGER
, BENJAMIN JOHNSTON
Language: eng
Format: epub
Publisher: Packt Publishing Pvt. Ltd.
Published: 2020-07-28T00:00:00+00:00
Activity 6.02: t-SNE Wine and Perplexity
In this activity, we will use the Wine dataset to further reinforce the influence of perplexity on the t-SNE visualization process. In this activity, we will try to determine whether we can identify the source of the wine based on its chemical composition. The t-SNE process provides an effective means of representing and possibly identifying the sources.
Note
This dataset is sourced from https://archive.ics.uci.edu/ml/machine-learning-databases/wine/ (UCI Machine Learning Repository [http://archive.ics.uci.edu/ml]. Irvine, CA: University of California, School of Information and Computer Science). It can be downloaded from https://packt.live/3aPOmRJ.
Import pandas, numpy, and matplotlib, as well as the t-SNE and PCA models from scikit-learn.
Load the Wine dataset and inspect the first five rows.
The first column provides the labels; extract these from the DataFrame and store them in a separate variable. Ensure that the column is removed from the DataFrame.
Execute PCA on the dataset and extract the first six components.
Construct a loop that iterates through the perplexity values (1, 5, 20, 30, 80, 160, 320). For each loop, generate a t-SNE model with the corresponding perplexity and print a scatter plot of the labeled wine classes. Note the effect of different perplexity values.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8309)
Test-Driven Development with Java by Alan Mellor(6795)
Data Augmentation with Python by Duc Haba(6713)
Principles of Data Fabric by Sonia Mezzetta(6458)
Learn Blender Simulations the Right Way by Stephen Pearson(6363)
Microservices with Spring Boot 3 and Spring Cloud by Magnus Larsson(6232)
Hadoop in Practice by Alex Holmes(5965)
Jquery UI in Action : Master the concepts Of Jquery UI: A Step By Step Approach by ANMOL GOYAL(5813)
RPA Solution Architect's Handbook by Sachin Sahgal(5633)
Big Data Analysis with Python by Ivan Marin(5398)
The Infinite Retina by Robert Scoble Irena Cronin(5320)
Life 3.0: Being Human in the Age of Artificial Intelligence by Tegmark Max(5159)
Pretrain Vision and Large Language Models in Python by Emily Webber(4363)
Infrastructure as Code for Beginners by Russ McKendrick(4130)
Functional Programming in JavaScript by Mantyla Dan(4044)
The Age of Surveillance Capitalism by Shoshana Zuboff(3964)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3843)
Embracing Microservices Design by Ovais Mehboob Ahmed Khan Nabil Siddiqui and Timothy Oleson(3647)
Applied Machine Learning for Healthcare and Life Sciences Using AWS by Ujjwal Ratan(3618)
